<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>最长单词游戏</title>
</head>

<body>
    <script>
    function findLongestWordLength(str) {
        let words = str.split(' ');
        let maxLength = 0;
        for (let i = 0; i < words.length; i++) {
            if (maxLength < words[i].length) {
                maxLength = words[i].length;
            }
        }
        return maxLength;
    }

    findLongestWordLength("The quick brown fox jumped over the lazy dog");
    </script>
</body>

</html>